package com.cmsr.hdpf.etl

import com.cmsr.hdpf.etl.task.GTParseRawJsonTask

import scala.collection.mutable.ListBuffer

object TaskEngine {
    def run(task: String, source: String, sink: String, parser: String, debug: String, windowSize: Int): Unit = {
        
        var jobs: ListBuffer[BaseTask] = ListBuffer() // 解析任务

        if (task.toLowerCase == "parse" && parser.toLowerCase.contains("gaotie")) {
            jobs += new GTParseRawJsonTask()
        }

        // 执行任务
        for (job <- jobs) {
            job.processTask(source, sink, debug, windowSize)
        }
    }
    
    
}
